import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);
const router = new Router({
  mode: "history",
  routes: [
    {
      path: "/ArticleList",
      name: "ArticleList",
      component: () => import("@/views/article/ArticleList"),
      meta: {title: "文章列表"},
    },
    {
      path: "/BlogListView",
      name: "BlogListView",
      component: () => import("@/views/blog/BlogList"),
      meta: {title: "帖子列表"},
    },
    {
      path: "/TopicList",
      name: "TopicList",
      component: () => import("@/views/blog/TopicList"),
      meta: {title: "话题列表"},
    },
    {
      path: "/BlogList",
      name: "BlogList",
      component: () => import("@/views/blog/BlogList"),
      meta: {title: "帖子"},
    },
    {
      path: "/ArticleContainer",
      name: "ArticleContainer",
      component: () => import("@/views/article/ArticleContainer"),
      meta: {title: "文章container"},
    },
    {
      path: "/login",
      name: "login",
      component: () => import("@/views/user/login"),
      meta: {title: "用户登录"},
    },
    {
      path: "/ViewConsult",
      name: "ViewConsult",
      component: () => import("@/views/consult/consultView"),
      meta: {title: "咨询管理"},
    },
    {
      path: "/ConsultRecord",
      name: "ConsultRecord",
      component: () => import("@/views/consult/ConsultRecord"),
      meta: {title: "咨询记录"},
    },
    {
      path: "/ReservationView",
      name: "ReservationView",
      component: () => import("@/views/reservation/ReservationView"),
      meta: {title: "咨询预约"},
    },
    {
      path: "/ChartYear",
      name: "ChartYear",
      component: () => import("@/views/chart/ChartYear"),
      meta: {title: "年度统计"},
    },
    {
      path: "/consultChart",
      name: "consultChart",
      component: () => import("@/views/chart/ConsultChart"),
      meta: {title: "统计"},
    },
    {
      path: "/chatView",
      name: "chatView",
      component: () => import("@/views/chat/chat"),
      meta: {title: "统计"},
    },
    {
      path: "/ConsultStatics",
      name: "ConsultStatics",
      component: () => import("@/views/consult/ConsultStatics"),
      meta: {title: "统计"},
    },
    {
      path: "/ChartYearStatics",
      name: "ChartYearStatics",
      component: () => import("@/views/consult/ConsultYearStatics"),
      meta: {title: "统计"},
    },
    {
      path: "/QuestionChart",
      name: "QuestionChart",
      component: () => import("@/views/chart/QuestionChart"),
      meta: {title: "问题统计"},
    },
    {
      path: "/QuestionAnalyse",
      name: "QuestionAnalyse",
      component: () => import("@/views/question/QuestionAnalyse"),
      meta: {title: "问题统计"},
    },
    {
      path: "/QuestionSubmit",
      name: "QuestionSubmit",
      component: () => import("@/views/question/Submit"),
      meta: {title: "问题统计"},
    },
    {
      path: "/ViewQuestionnaire",
      name: "ViewQuestionnaire",
      component: () => import("@/views/question/QuestionnaireView"),
      meta: {title: "问卷管理"},
    },
    {
      path: "/ViewQuestionnaireDetail",
      name: "ViewQuestionnaireDetail",
      component: () => import("@/views/question/QuestionnaireDetail"),
      meta: {title: "问卷详情"},
    },
    {
      path: "/consultant/consult",
      name: "consultant_reservation",
      component: () => import("@/views/reservation/consultant"),
      meta: {title: "我的咨询"},
    },
    {
      path: "/reservation",
      name: "reservation",
      component: () => import("@/views/reservation/index"),
      meta: {title: "预约申请"},
    },
    {
      path: "/record",
      name: "record",
      component: () => import("@/views/reservation/record"),
      meta: {title: "预约记录"},
    },
    {
      path: "/ViewArticle",
      name: "ViewArticle",
      component: () => import("@/views/article/ArticleView"),
      meta: {title: "文章管理"},
    },
    {
      path: "/article/detail/:id",
      name: "detail",
      component: () => import("@/views/article/context"),
      meta: { title: "文章详情" },
    },
    {
      path: "*",
      component: () => import("@/views/error-page/404"),
      meta: {title: "404"},
    },
  ],
});

export {router};
